import 'babel-polyfill'
import Vue from 'vue'
import 'lib-flexible'
import App from './App.vue'
import router from '@/router'
import store from '@/store'
// 导航守卫
// import 'utils/permission'
import SvgIcon from 'components/SvgIcon'
import '@/icons' // icon
import '@/style/common.scss'
import { Lazyload } from 'vant'
// WebSocket
import VueSocketIO from 'vue-socket.io';
import mavonEdiroe from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'
// import hljs from 'highlight.js'
// // 代码高亮指令
// Vue.directive('highlight', (el) => {
//         let blocks = el.querySelectorAll('pre code')
//         blocks.forEach((block) => {
//             hljs.highlightBlock(block)
//         })
//     })
Vue.use(mavonEdiroe)
    // import socketio from 'socket.io-client';
    // 与服务端链接

// Vue.use(VueSocketio, socketio('http://localhost:8080/'));
Vue.use(new VueSocketIO({
    debug: true, // 设置true可以让你的控制台文字变颜色，更好的调试阅读
    connection: 'http://123.56.85.24:5000',
}))

Vue.use(Lazyload)

Vue.component('svg-icon', SvgIcon)
new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')
